package com.ttg.common.enums;

import lombok.Getter;

/**
 * Description： 区间类型
 * Author: chenyou
 * Date: 2025/9/22 15:28
 * Company: ttg
 * Copyright: Copyright (c) 2025
 */
@Getter
public enum IntervalTypeEnum {

    年度区间("year","年度区间"),

    月度区间("month","月度区间"),

    累计区间("aggregate","累计区间"),
    ;

    IntervalTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;
    private String desc;

    public static IntervalTypeEnum getByVal(String value){
        for(IntervalTypeEnum curr:IntervalTypeEnum.values()){
            if(curr.value.equals(value)){
                return curr;
            }
        }
        return null;
    }
}
